import request from '@/utils/request'

// 查询结算主记录列表 (分页)
export function selectPageInpFeesMaster(query) {
    return request({
        url: '/business/inpFeesMaster/selectPage',
        method: 'get',
        params: query
    })
}

// 查询结算主记录列表 (不分页)
export function listInpFeesMaster(query) {
    return request({
        url: '/business/inpFeesMaster/list',
        method: 'get',
        params: query
    })
}

// 查询结算主记录列表
export function listInpFeesMasterToFeesNo(query) {
    return request({
        url: '/business/inpFeesMaster/listInpFeesMasterToFeesNo',
        method: 'get',
        params: query
    })
}

// 查询结算主记录详细
export function getInpFeesMaster(inpFeesMasterId) {
    return request({
        url: '/business/inpFeesMaster/' + inpFeesMasterId,
        method: 'get'
    })
}

// 新增结算主记录
export function addInpFeesMaster(data) {
    return request({
        url: '/business/inpFeesMaster',
        method: 'post',
        data: data
    })
}

// 取消结算
export function confirmCancellation(data) {
    return request({
        url: '/business/inpFeesMaster/confirmCancellation',
        method: 'post',
        data: data
    })
}

// 修改结算主记录
export function updateInpFeesMaster(data) {
    return request({
        url: '/business/inpFeesMaster',
        method: 'put',
        data: data
    })
}

// 删除结算主记录
export function delInpFeesMaster(inpFeesMasterId) {
    return request({
        url: '/business/inpFeesMaster/' + inpFeesMasterId,
        method: 'delete'
    })
}

// 获取住院结账页面综合信息（用于结账查询）
export function getUserCostAndTotal(query) {
    return request({
        url: "/business/inpFeesMaster/getUserCostAndTotal",
        method: "get",
        params: query,
    });
}
